import request from '@/utils/request'

export default {

  // 查询全部轮播图信息
  selectAllBanners(bannerQuery) {
    return request({
      url: '/crmBanner/admin/selectAllBanners',
      method: 'post',
      data: bannerQuery
    });
  },
  // 删除banner
  deleteBanner(bannerId) {
    return request({
      url: `/crmBanner/admin/deleteBanner/${bannerId}`,
      method: 'delete'
    });
  },
  // 新增banner
  addBanner(banner) {
    return request({
      url: '/crmBanner/admin/addBanner',
      method: 'post',
      data: banner
    });
  },
  // 修改banner
  updateBanner(banner) {
    return request({
      url: '/crmBanner/admin/updateBanner',
      method: 'put',
      data: banner
    });
  }
}
